Fix module-loader cache expiry and concurrency - #1753
Merged
Conversation
Zetazzz
force-pushed
the
agent/express-context-loader-bounds
branch
from
September 6, 2026 01:51
e8438de to
d5dac4d
Compare
Zetazzz
force-pushed
the
test/performance-harness-core
branch
from
September 6, 2026 01:51
45cbb07 to
658736e
Compare
Zetazzz
force-pushed
the
test/performance-harness-core
branch
from
September 7, 2026 03:22
658736e to
f7c63ec
Compare
Zetazzz
marked this pull request as ready for review
September 7, 2026 03:23
|
Review complete. No issues found — approved ✅. This PR introduces two new capabilities: an LRU-cached, coalescing module loader in
Reviewed commit: d5dac4d |
Zetazzz
force-pushed
the
agent/express-context-loader-bounds
branch
from
September 7, 2026 03:23
d5dac4d to
ca37b7c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Frequent cache hits could keep module configuration cached indefinitely.
Concurrent cache misses could also start duplicate queries, and queries
that completed after invalidation could repopulate the cache with old results.
within each loader instance.
newer pending work.
Related: constructive-io/constructive-planning#1693 (F11).
Behavior
The existing
databaseId/ optionalapiIdkey,invalidate(databaseId?)API,default 60-second TTL, and default 100-entry cache limit are retained.
TTL resolution uses the
lru-cachedefault.undefinedresults and PostgreSQL42P01results remain uncached.Other resolution errors continue to propagate.
Invalidation does not cancel running queries: existing callers may still
receive their results, but those results cannot repopulate the cache.
Validation
e71a1910b7e2.races, capacity limits, uncached absence, error propagation, and registry
forwarding.